require 'rspec/core'

if defined?(SimpleCov)
  SimpleCov.start do
    add_group 'Main', '/lib/'
  end
end

DUMMY_APP_PATH = File.expand_path( File.join('../dummy'), __FILE__ )

# loading dummy app
ENV["RAILS_ENV"] = "development"
require File.join(DUMMY_APP_PATH,'config/environment')

# running migrations
ActiveRecord::Migration.verbose = false
load File.join(DUMMY_APP_PATH,'db/schema.rb')
Rails.backtrace_cleaner.remove_silencers!

require 'rspec/rails'

# Requires supporting files with custom matchers and macros, etc,
# # in ./support/ and its subdirectories.
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}

RSpec.configure do |config|
end
